package com.greendragon.persistence.domain; 

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/** 
 * @author wulibin, exceptsky@gmail.com, 2011-9-8 下午11:03:26
 * 
 */
@Entity
@Table(name="siteInfo")
public class SiteInfo implements Serializable{
	private static final long serialVersionUID = -432876883035352922L;

	private Long id;
	private String title;														//标题
	private String subTitle;													//副标题
	private String domain;														//域名
	private String keyWords;													//关键字
	private String beian;														//备案信息，如浙ICP备09002787号-2
	private String description;													//描述信息
	private String customCode;													//自定义代码，如：google分析
	private Integer articalPageLength = new Integer(0);							//文章列表长度
	private Integer productPageLength = new Integer(0);							//产品列表长度
	private Integer feedPageLength = new Integer(0);							//Feed同步的长度
	private Boolean fullArtical = new Boolean(false);							//feed是否输出每篇文章全文
	private Boolean commentVerify = new Boolean(false);							//是否开启评论审核
	private Boolean articalCommentOn = new Boolean(true);						//是否允许文章评论
	private Boolean articalAnonymousCommentOn = new Boolean(false);				//是否允许文章匿名评论
	private Boolean productCommentOn = new Boolean(true);						//是否允许产品评论
	private Boolean productAnonymousCommentOn = new Boolean(false);				//是否允许产品匿名评论
	private Date modifiedAt;													//最后修改日期

	public SiteInfo(){}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="title", length=50)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name="subTitle", length=50)
	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}
	
	@Column(name="domain", length=50)
	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	@Column(name="copyright", length=50)
	public String getBeian() {
		return beian;
	}
	public void setBeian(String beian) {
		this.beian = beian;
	}

	@Column(name="keyWords", length=255)
	public String getKeyWords() {
		return keyWords;
	}

	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}

	@Column(name="description", length=255)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Lob
	@Column(name="customCode")
	public String getCustomCode() {
		return customCode;
	}

	public void setCustomCode(String customCode) {
		this.customCode = customCode;
	}
	
	@Column(name="articalPageLength")
	public Integer getArticalPageLength() {
		return articalPageLength;
	}

	public void setArticalPageLength(Integer articalPageLength) {
		this.articalPageLength = articalPageLength;
	}

	@Column(name="productPageLength")
	public Integer getProductPageLength() {
		return productPageLength;
	}

	public void setProductPageLength(Integer productPageLength) {
		this.productPageLength = productPageLength;
	}

	@Column(name="feedPageLength")
	public Integer getFeedPageLength() {
		return feedPageLength;
	}

	public void setFeedPageLength(Integer feedPageLength) {
		this.feedPageLength = feedPageLength;
	}
	
	@Column(name="fullArtical")
	public Boolean getFullArtical() {
		return fullArtical;
	}

	public void setFullArtical(Boolean fullArtical) {
		this.fullArtical = fullArtical;
	}

	@Column(name="needVerify")
	public Boolean getCommentVerify() {
		return commentVerify;
	}

	public void setCommentVerify(Boolean commentVerify) {
		this.commentVerify = commentVerify;
	}
	
	@Column(name="articalCommentOn")
	public Boolean getArticalCommentOn() {
		return articalCommentOn;
	}

	public void setArticalCommentOn(Boolean articalCommentOn) {
		this.articalCommentOn = articalCommentOn;
	}

	@Column(name="articalAnonymousCommentOn")
	public Boolean getArticalAnonymousCommentOn() {
		return articalAnonymousCommentOn;
	}

	public void setArticalAnonymousCommentOn(Boolean articalAnonymousCommentOn) {
		this.articalAnonymousCommentOn = articalAnonymousCommentOn;
	}

	@Column(name="productCommentOn")
	public Boolean getProductCommentOn() {
		return productCommentOn;
	}

	public void setProductCommentOn(Boolean productCommentOn) {
		this.productCommentOn = productCommentOn;
	}

	@Column(name="productAnonymousCommentOn")
	public Boolean getProductAnonymousCommentOn() {
		return productAnonymousCommentOn;
	}

	public void setProductAnonymousCommentOn(Boolean productAnonymousCommentOn) {
		this.productAnonymousCommentOn = productAnonymousCommentOn;
	}

	@Column(name="modifiedAt")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getModifiedAt() {
		return modifiedAt;
	}

	public void setModifiedAt(Date modifiedAt) {
		this.modifiedAt = modifiedAt;
	}
}
 